﻿#pragma once

#include "common_data.h"

enum class RunState {
	robot_state_unknow = 0,
	robot_state_normal = 1,
	robot_state_pause = 2,
	robot_state_stop = 3,

	robot_state_max,
};

struct JointInfo {
	float joint1;
	float joint2;
	float joint3;
	float joint4;
	float joint5;
	float joint6;
};

struct RobotInfo {
	bool connected;
	RunState run;
	QString joints;
	Position target;
	bool moving;
	int toolid;
	int faultcode;
	QString faultMsg;
	QString diInfo;
	QString doinfo;
};

json_struct(SetDOParamJ,
	mapping(int, index);
mapping(int, val);
prop(&index, &val);
)

json_struct(GripParamJ,
	mapping(int, index);
prop(&index);
)


